<!DOCTYPE html>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<c:set var="contextPath" value="${pageContext.request.contextPath}" />
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>管理者页面</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<meta content="width=device-width, initial-scale=1" name="viewport">
<link rel="stylesheet" type="text/css" href="${contextPath}/css/bootstrap.min.css" />
<link rel="stylesheet" type="text/css" href="${contextPath}/css/bootstrap-theme.min.css" />
<link rel="stylesheet" type="text/css" href="${contextPath}/css/umeditor.min.css" />
<link href="${contextPath}/css/jquery-ui.min.css" rel="stylesheet">
<link href="${contextPath}/css/jquery-ui.theme.min.css" rel="stylesheet">
<link rel="stylesheet" type="text/css" href="${contextPath}/css/public.css">
<style type="text/css">
	.input-group-addon,.form-control{padding:6px;}
	.ui-datepicker .ui-datepicker-title select{color:#1c94c4}
</style>
<script type="text/javascript" src="${contextPath}/js/jquery.min.js"></script>
<script type="text/javascript" src="${contextPath}/js/bootstrap.min.js"></script>
<script type="text/javascript" src="${contextPath}/js/umeditor.config.js"></script>
<script type="text/javascript" src="${contextPath}/js/umeditor.js"></script>
<script type="text/javascript" src="${contextPath}/lang/zh-cn/zh-cn.js"></script>
<script type="text/javascript" src="${contextPath}/js/common.js"></script>
<script type="text/javascript" src="${contextPath}/js/jquery.ui.core.js"></script>
<script type="text/javascript" src="${contextPath}/js/jquery.ui.widget.js"></script>
<script type="text/javascript" src="${contextPath}/js/jquery.ui.datepicker.js"></script>
<script type="text/javascript" src="${contextPath}/js/jquery.ui.datepicker-ch.js"></script>
<style type="text/css">
	#articleTop-tbody .titleTd, #articleList-tbody .titleTd{
		text-align: left;
	}
	#articleTop-tbody .titleTd a, #articleList-tbody .titleTd a{
		margin-left: 15px;
	}
</style>
</head>
<body>
	<jsp:include page="../head.jsp" />
	<div class="container" style="max-width: 1366px">
	<!-----------------------------------------------------选项卡 ----------------------------->
		<ul class="nav nav-tabs" role="tablist">
			<li class="active"><a href="#workerList" role="tab" data-toggle="tab">用户列表</a></li>
			<!--<li><a href="#workerSalarList" role="tab" data-toggle="tab">工资列表</a></li>-->
			<li><a href="#workerLvlList" role="tab" data-toggle="tab">等级列表</a></li>
			<li><a href="#workGroupList" role="tab" data-toggle="tab">工作组列表</a></li>
			<li><a href="#inspectionDetail" role="tab" data-toggle="tab">审核信息</a></li>
			<li><a href="#salarySettings" role="tab" data-toggle="tab">结算设置</a></li>
			<li><a href="#workGroupSetting" role="tab" data-toggle="tab">工作组管理</a></li>
			<li><a href="#alipayInfoList" role="tab" data-toggle="tab">支付宝支付列表</a></li>
			<li><a href="#noticeEdit" role="tab" data-toggle="tab">编辑通知公告</a></li>
			<li ><a href="#articleList" role="tab" data-toggle="tab">交流区</a></li>
			<li style="float: right;"><a target="_blank" href="${contextPath}/security/workerRecordSearch">支付宝支付任务查询</a></li>
		</ul>
	<!--------------------------------------------------------------------------------------->
		<div class="tab-content">
		<!-- -----------------------------------------------用户列表------------------------------------------------ -->
			<div class="tab-pane active" id="workerList">
				<div class="panel panel-default">
					<div class="panel-heading" style="height: 38px;">	
						<span id="aduitingMarkTimeMonthTotle" class="pull-right text-success" style="padding-left: 20px;"></span>
						<span id="taskMarkTimeMonthTotle" class="pull-right text-success"></span>
					</div>
					<div class="panel-body">
						<form class="form-inline" role="form">					
							<div class="col-sm-3" style="width: 225px;">
								<div class="form-group">
									<div class="input-group" style="width: 220px;"> 
										<div class="input-group-addon"> 用户名</div>
										<input class="form-control" onkeydown="if(event.keyCode==13){return false;}" id="userNameCondition" type="text" placeholder="查询用户">
									</div>
								</div>
							
							</div>					
							<div class="col-xs-2" style="width: 140px;">
								<div class="form-group">
									<div class="input-group" style="width: 135px;">
										<div class="input-group-addon">起始</div>
										<input class="form-control" onkeydown="if(event.keyCode==13){return false;}" id="beginDate" type="text" placeholder="起始时间">
									</div>
								</div>
							</div>					
							<div class="col-xs-2" style="width: 140px;">
								<div class="form-group">
									<div class="input-group" style="width: 135px;">
										<div class="input-group-addon">截止</div>
										<input class="form-control" onkeydown="if(event.keyCode==13){return false;}" id="endDate" type="text" placeholder="截止时间">
									</div>
								</div>
							</div>			
							<div class="col-xs-2" style="width: 101px;">
								<div class="form-group">
									<div class="input-group" style="width: 96px;">	
										<div class="input-group-addon">类别</div>
										<select class="form-control" id="dateTypeCheck">
											<option value="1">日</option>
											<option value="2">月</option>
											<option value="3">年</option>
										</select>
									</div>
								</div>
							</div>
							<div class="col-xs-2" style="width: 101px;">
								<div class="form-group">
									<div class="input-group" style="width: 96px;">
										<div class="input-group-addon">状态</div>
										<select class="form-control" id="taskUpload">
											<option value="2">全</option>
											<option value="1">有</option>
											<option value="0">无</option>
										</select>
									</div>
								</div>				
							</div>
							<div class="col-xs-2" style="width: 140px;">
								<div class="form-group">
									<div class="input-group" style="width: 135px;">
										<div class="input-group-addon">支付宝</div>
										<select class="form-control" id="alipayEnabled">
											<option value="9">全部</option>
											<option value="1">启用</option>
											<option value="0">未启用</option>
										</select>
									</div>
								</div>				
							</div>
							<div class="btn2" style="float: right;">
								<button type="button" id="searchBtn" class="btn btn-default" >查询</button>
							<!-- cx20150105 -->
								<button type="button" id="changeBtn" class="btn btn-default" >设置</button>
							</div>			
						</form>
						<div style="clear: both;"></div>
					</div>
					<table class="table table-striped table-bordered">
						<thead>
							<tr>
								<th width='4%'>序号</th>
								<th width='10%'>用户名</th>
								<th width='6%'>姓名</th>
								<th width='12%'>电话号</th>
								<th width='11%'>标注时间</th>
								<th width='13%'>未审时间</th>
								<th width='11%'>下/进/审</th>
								<th width='11%'>完/弃/过</th>
								<th width='6%'>状态</th>
								<th width='6%'>推荐人数</th>
								<th width='8%'>支付宝状态</th>
							</tr>
						</thead>
						<tbody id = "user-tbody"></tbody>
					</table>
					<ul class="pagination"></ul>
				</div>
			</div>
			<!-- ----------------------------------------------工资列表--------------------------------------------------- -->
			<!-- <div class="tab-pane" id="workerSalarList">
				<div class="panel panel-default">
					<!-- <div class="panel-heading" style="height: 38px;">
						<span id="aduitingMarkTimeMonthTotle1" class="pull-right text-success" style="padding-left: 20px;"></span>
						<span id="taskMarkTimeMonthTotle1" class="pull-right text-success"></span>
					</div> 
					<div class="panel-body">
						<form class="form-inline" role="form">					
							<div class="col-sm-3" style="width: 175px;">
								<div class="form-group">
									<div class="input-group" style="width: 170px;"> 
										<div class="input-group-addon"> 用户名</div>
										<input class="form-control" onkeydown="if(event.keyCode==13){return false;}" id="userNameCondition1" type="text" placeholder="查询用户">
									</div>
								</div>							
							</div>					
							<div class="col-xs-2" style="width: 140px;">
								<div class="form-group">
									<div class="input-group" style="width: 135px;">
										<div class="input-group-addon">起始</div>
										<input class="form-control" onkeydown="if(event.keyCode==13){return false;}" id="beginDate1" type="text" placeholder="起始时间">
									</div>
								</div>
							</div>					
							<div class="col-xs-2" style="width: 140px;">
								<div class="form-group">
									<div class="input-group" style="width: 135px;">
										<div class="input-group-addon">截止</div>
										<input class="form-control" onkeydown="if(event.keyCode==13){return false;}" id="endDate1" type="text" placeholder="截止时间">
									</div>
								</div>
							</div>			
							<div class="col-xs-2" style="width: 101px;">
								<div class="form-group">
									<div class="input-group" style="width: 96px;">	
										<div class="input-group-addon">类别</div>
										<select class="form-control" id="dateTypeCheck1">
											<option value="1">日</option>
											<option value="2" selected="selected">月</option>
											<option value="3">年</option>
										</select>
									</div>
								</div>
							</div>
							<div class="col-sm-3" style="width: 101px;">
								<div class="form-group">
									<div class="input-group" style="width: 96px;"> 
										<div class="input-group-addon"> 金额</div>
										<input class="form-control" onkeydown="if(event.keyCode==13){return false;}" id="salaryLine" type="text" placeholder="输入金额" value="0">
									</div>
								</div>							
							</div>
					  		<div class="col-xs-2" style="width: 111px;">
								<div class="form-group">
									<div class="input-group" style="width: 105px;">
										<div class="input-group-addon">结算</div>
										<select class="form-control" id="payOffType">
											<option value="2">全部</option>
											<option value="1">已结</option>
											<option value="0">未结</option>
										</select>
									</div>
								</div>				
							</div>
							<div class="btn2" style="float: right;">
								<button type="button" id="searchSalaryBtn" class="btn btn-default" >查询</button>
								<button type="button" id="payOffBtn" class="btn btn-default" >结算</button>
							</div>			
						</form>
						<div style="clear: both;"></div>
					</div>
					<table class="table table-striped table-bordered">
						<thead>
							<tr>
								<th width='4%'>序号</th>
								<th width='12%'>姓名</th>
								<th width='12%'>银行卡号</th>
								<th width='15%'>标注时间</th>
								<th width='15%'>金额</th>
								<th width='10%'><a href="#" id="choose"><span id="choose-p">全选</span></a></th>
							</tr>
						</thead>
						<tbody id = "workerSalary-tbody"></tbody>
					</table>
					<ul class="pagination"></ul>
				</div>
			</div>-->
			<!-- ------------------------------------------------------------------------------------------------- -->
			<!-- ----------------------------------------------等级列表--------------------------------------------------- -->
			<div class="tab-pane" id="workerLvlList">
				<div class="panel panel-default">
					<div class="panel-body">
						<form class="form-inline" role="form">					
							<div class="col-sm-3" style="width: 175px;">
								<div class="form-group">
									<div class="input-group" style="width: 170px;"> 
										<div class="input-group-addon"> 用户名</div>
										<input class="form-control" onkeydown="if(event.keyCode==13){return false;}" id="userNameConditionWorkerLvl" type="text" placeholder="查询用户">
									</div>
								</div>							
							</div>
							<div class="col-xs-2" style="width: 101px;">
								<div class="form-group">
									<div class="input-group" style="width: 110px;">	
										<div class="input-group-addon">等级</div>
										<select class="form-control" id="userLvl">
											<option value="0" selected="selected">全部</option>
											<option value="1">一级</option>
											<option value="2">二级</option>
										</select>
									</div>
								</div>
							</div>					
							<div class="btn2" style="float: right;">
								<button type="button" id="searchWorkerLvlBtn" class="btn btn-default" >查询</button>
								<button type="button" id="updateWorkerLvlBtn" class="btn btn-default" >设置</button>
							</div>			
						</form>
						<div style="clear: both;"></div>
					</div>
					<table class="table table-striped table-bordered">
						<thead>
							<tr>
								<th width='4%'>序号</th>
								<th width='12%'>用户名</th>
								<th width='12%'>姓名</th>
								<th width='15%'>等级</th>
								<th width='10%'><a href="#" id="chooseLvl"><span id="choose-lvl">全选</span></a></th>
							</tr>
						</thead>
						<tbody id = "workerLvl-tbody"></tbody>
					</table>
					<ul class="pagination"></ul>
				</div>
			</div>
			<!-- ------------------------------------------------------------------------------------------------- -->
			<!-- ----------------------------------------------工作组列表--------------------------------------------------- -->
			<div class="tab-pane" id="workGroupList">
				<div class="panel panel-default">
					<div class="panel-heading" style="height: 38px;">
						<span id="aduitingMarkTimeMonthTotle1" class="pull-right text-success" style="padding-left: 20px;"></span>
						<span id="taskMarkTimeMonthTotle1" class="pull-right text-success"></span>
					</div>
					<div class="panel-body">
						<form class="form-inline" role="form">					
							<div class="col-sm-3" style="width: 175px;">
								<div class="form-group">
									<div class="input-group" style="width: 170px;"> 
										<div class="input-group-addon">工作组名称</div>
										<input class="form-control" onkeydown="if(event.keyCode==13){return false;}" id="workGroupNameCondition" type="text" placeholder="查询工作组">
									</div>
								</div>							
							</div>					
							<div class="col-xs-2" style="width: 140px;">
								<div class="form-group">
									<div class="input-group" style="width: 135px;">
										<div class="input-group-addon">起始</div>
										<input class="form-control" onkeydown="if(event.keyCode==13){return false;}" id="workGroupBeginDate" type="text" placeholder="起始时间">
									</div>
								</div>
							</div>					
							<div class="col-xs-2" style="width: 140px;">
								<div class="form-group">
									<div class="input-group" style="width: 135px;">
										<div class="input-group-addon">截止</div>
										<input class="form-control" onkeydown="if(event.keyCode==13){return false;}" id="workGroupEndDate" type="text" placeholder="截止时间">
									</div>
								</div>
							</div>			
							<div class="col-xs-2" style="width: 101px;">
								<div class="form-group">
									<div class="input-group" style="width: 96px;">	
										<div class="input-group-addon">类别</div>
										<select class="form-control" id="workGroupDateTypeCheck">
											<option value="1">日</option>
											<option value="2" selected="selected">月</option>
											<option value="3">年</option>
										</select>
									</div>
								</div>
							</div>
							<div class="btn2" style="float: right;">
								<button type="button" id="workGroupSearchBtn" class="btn btn-default" >查询</button>
							</div>			
						</form>
						<div style="clear: both;"></div>
					</div>
					<table class="table table-striped table-bordered">
						<thead>
							<tr>
								<th width='4%'>序号</th>
								<th width='12%'>工作组名称</th>
								<th width='15%'>标注时间(小时)</th>
								<th width='15%'>金额(元)</th>
								<th width='10%'>当前工作人数</th>
								<th width='20%' colspan="2">操作</th>
							</tr>
						</thead>
						<tbody id = "workerGroup-tbody"></tbody>
					</table>
					<ul class="pagination"></ul>
				</div>
			</div>
			<!-- ------------------------------------------------------------------------------------------------- -->
			<!-- ----------------------------------------------审核信息--------------------------------------------------- -->
			<div class="tab-pane" id="inspectionDetail">
				<div class="panel panel-default">
<!-- 				<div class="panel-heading" style="height: 38px;">
						<span id="aduitingMarkTimeMonthTotle1" class="pull-right text-success" style="padding-left: 20px;"></span>
						<span id="taskMarkTimeMonthTotle1" class="pull-right text-success"></span>
					</div> -->	
					<div class="panel-body">
						<form class="form-inline" role="form">		
							<div class="col-xs-2" style="width: 140px;">
								<div class="form-group">
									<div class="input-group" style="width: 135px;">
										<div class="input-group-addon">起始</div>
										<input class="form-control" onkeydown="if(event.keyCode==13){return false;}" id="inspectionDetailBeginDate" type="text" placeholder="起始时间">
									</div>
								</div>
							</div>					
							<div class="col-xs-2" style="width: 140px;">
								<div class="form-group">
									<div class="input-group" style="width: 135px;">
										<div class="input-group-addon">截止</div>
										<input class="form-control" onkeydown="if(event.keyCode==13){return false;}" id="inspectionDetailEndDate" type="text" placeholder="截止时间">
									</div>
								</div>
							</div>			
							<div class="col-xs-2" style="width: 101px;">
								<div class="form-group">
									<div class="input-group" style="width: 96px;">	
										<div class="input-group-addon">类别</div>
										<select class="form-control" id="inspectionDetailDateTypeCheck">
											<option value="1">日</option>
											<option value="2" selected="selected">月</option>
											<option value="3">年</option>
										</select>
									</div>
								</div>
							</div>
							<div class="btn2" style="float: right;">
								<button type="button" id="inspectionDetailSearchBtn" class="btn btn-default" >审核信息查询</button>&nbsp;&nbsp;
								<button type="button" id="inspectionOvertimeRecordSearchBtn" class="btn btn-danger" >审核超时信息</button>&nbsp;&nbsp;
								<button type="button" id="inspectionMarkTimeRecordSearchBtn" class="btn btn-info" >审核时间查询</button>
							</div>			
						</form>
						<div style="clear: both;"></div>
					</div>
					
					<table class="table table-striped table-bordered">
						<thead>
							<tr>
								<td colspan="6">
									<span class="pull-left text-success" style="padding-left: 20px;">工作者完成任务数：</span>
									<span id="workerDoneTaskNum" class="pull-left text-success"></span>
									<br>
									<span class="pull-left text-success" style="padding-left: 20px;">未审核任务数：</span>
									<span id="notInspectTaskNum" class="pull-left text-success"></span>
								</td>
							</tr>
							<tr>
								<th width='12%'>审核类型</th>
								<th width='15%'>个数</th>
								<th width='15%'>抽检个数</th>
								<th width='15%' colspan="2">抽检比例</th>
								<th width='15%'>抽检次数</th>
							</tr>
						</thead>
						<tbody id = "inspectionDetail-tbody"></tbody>
					</table>
					<br/>
					<br/>
					<div id="inspectionOvertimeRecordDiv" >
						<table class="table table-striped table-bordered">
							<thead>
								<tr>
									<th colspan="4">审核超时数据记录</th>
								</tr>
								<tr>
									<th width='25%'>序号</th>
									<th width='25%' title="自营平台从工作者上传至初审超过48小时任务数">任务数(自营)</th>
									<th width='25%' title="从外包初审到巡审超过48小时任务数">任务数(外包)</th>
									<th width='25%'>记录时间</th>
								</tr>
							</thead>
							<tbody id = "inspectionOvertimeRecord-tbody"></tbody>
						</table>
					</div>
					<br/>
					<br/>
					<div id="inspectionMarkTimeRecordDiv" >
						<table class="table table-striped table-bordered">
							<thead>
								<tr>
									<th colspan="7">审核有效时间记录</th>
								</tr>
								<tr>
									<th width='5%'>序号</th>
									<th width='10%'>用户名</th>
									<th width='10%'>姓名</th>
									<th width='5%'>类型</th>
									<th width='15%'>审核合格时间(小时)</th>
									<th width='15%'>审核不合格时间(小时)</th>
									<th width='15%'>总时间(小时)</th>
								</tr>
							</thead>
							<tbody id = "inspectionMarkTimeRecord-tbody"></tbody>
						</table>
					</div>
				</div>
			</div>
			<!-- ----------------------------------------------结算设置--------------------------------------------------- -->
			<div class="tab-pane" id="salarySettings">
				<div class="panel panel-default">
					<div class="panel-body">
						<form class="form-inline" role="form">		
							<div class="col-xs-2" style="width: 101px;">
								<div class="form-group">
									<div class="input-group" style="width: 300px;">	
										<div class="input-group-addon" style="width: 158px;">自营平台工资计算节点</div>
										<select class="form-control" id="salaryCountTiming">
											<option value="1">初审合格后计算</option>
											<option value="2">巡审合格后计算</option>
											<option value="3">包审合格后计算</option>
										</select>
									</div>
									<br>
									<br>
									<div class="input-group" style="width: 300px;">	
										<div class="input-group-addon" style="width: 158px;">外包商工资计算节点</div>
										<select class="form-control" id="outsourcerSalaryCountTiming">
											<option value="1">初审合格后计算</option>
											<option value="2">巡审合格后计算</option>
											<option value="3">包审合格后计算</option>
										</select>
									</div>
								</div>
							</div>
							<div class="btn2" style="float: right; margin-right: 30px;">
								<button type="button" id="salaryCountTimingBtn" class="btn btn-default" >确定</button>
								<br>
								<br>
								<button type="button" id="outsourcerSalaryCountTimingBtn" class="btn btn-default" >确定</button>
							</div>			
						</form>
						<div style="clear: both;"></div>
					</div>
				</div>
			</div>
			<!-- ----------------------------------------------工作组管理--------------------------------------------------- -->
			<div class="tab-pane" id="workGroupSetting">
				<div class="panel panel-default">
					<div class="panel-body">
						<div class="btn1" style="float: right;">
							<button type="button" id="addWorkGroupInfoBtn" class="btn btn-success" >添加新的工作组</button>
							<button type="button" id="notReturnSearch" class="btn btn-danger" >查询持有任务数</button>
							<button type="button" id="outsourcerSettingBtn" class="btn btn-primary" >设置外包商</button>
						</div>		
						<div style="clear: both;"></div>
					</div>
					<table class="table table-striped table-bordered">
						<thead>
							<tr>
								<th width='3%'>序号</th>
								<th width='10%'>工作组名称</th>
								<th width='7%'>工作组编号</th>
								<th width='8%'>一层任务工资</th>
								<th width='8%'>三层任务工资</th>
								<th width='10%'>一层补贴比例(%)</th>
								<th width='10%'>是否启用</th>
								<th width='10%'>是否为外包商</th>
								<th width='9%'>持有任务总数</th>
								<th width='9%'>工作者未上传数</th>
								<th width='9%'>待初审审核数</th>
								<th width='9%'>待初审修改数</th>
							</tr>
						</thead>
						<tbody id = "workGroupSetting-tbody"></tbody>
					</table>
					<!-- <ul class="pagination"></ul> -->
				</div>
			</div>
			<!-- ----------------------------------------------支付宝支付列表--------------------------------------------------- -->
			<div class="tab-pane" id="alipayInfoList">
				<div class="panel panel-default">
					<div class="panel-heading" style="height: 38px;">
						<div style="float: right; color: green;">当前页成功支付金额:<span id="pageSalary"></span>元&nbsp;&nbsp;总成功支付金额:<span id="totleSalary"></span>元</div>
					</div>
					<div class="panel-body">
						<form class="form-inline" role="form">	
							<div class="col-sm-3" style="width: 230px;">
								<div class="form-group">
									<div class="input-group" style="width: 220px;"> 
										<div class="input-group-addon">支付宝账号</div>
										<input class="form-control" onkeydown="if(event.keyCode==13){return false;}" id="alipayAccount" type="text" placeholder="查询支付宝账号">
									</div>
								</div>							
							</div>					
							<div class="col-sm-3" style="width: 175px;">
								<div class="form-group">
									<div class="input-group" style="width: 170px;"> 
										<div class="input-group-addon">收款人姓名</div>
										<input class="form-control" onkeydown="if(event.keyCode==13){return false;}" id="payeeRealName" type="text" placeholder="查询姓名">
									</div>
								</div>							
							</div>					
							<div class="col-xs-2" style="width: 140px;">
								<div class="form-group">
									<div class="input-group" style="width: 135px;">
										<div class="input-group-addon">起始</div>
										<input class="form-control" onkeydown="if(event.keyCode==13){return false;}" id="alipayBeginDate" type="text" placeholder="起始时间">
									</div>
								</div>
							</div>					
							<div class="col-xs-2" style="width: 140px;">
								<div class="form-group">
									<div class="input-group" style="width: 135px;">
										<div class="input-group-addon">截止</div>
										<input class="form-control" onkeydown="if(event.keyCode==13){return false;}" id="alipayEndDate" type="text" placeholder="截止时间">
									</div>
								</div>
							</div>			
							<div class="col-xs-2" style="width: 101px;">
								<div class="form-group">
									<div class="input-group" style="width: 96px;">	
										<div class="input-group-addon">类别</div>
										<select class="form-control" id="alipayDateTypeCheck">
											<option value="1">日</option>
											<option value="2" selected="selected">月</option>
											<option value="3">年</option>
										</select>
									</div>
								</div>
							</div>
							<div class="col-xs-2" style="width: 120px;">
								<div class="form-group">
									<div class="input-group" style="width: 110px;">	
										<div class="input-group-addon">状态</div>
										<select class="form-control" id="alipayStatus">
											<option value="9" selected="selected">全部</option>
											<option value="1">成功</option>
											<option value="0">失败</option>
										</select>
									</div>
								</div>
							</div>
							<div class="btn2" style="float: right;">
								<button type="button" id="alipaySearchBtn" class="btn btn-default" >查询</button>
							</div>			
						</form>
						<div style="clear: both;"></div>
					</div>
					<table class="table table-striped table-bordered">
						<thead>
							<tr>
								<th width='4%'>序号</th>
								<th width='10%'>支付宝账号</th>
								<th width='12%'>收款人姓名</th>
								<th width='20%'>订单号</th>
								<th width='12%'>支付时间</th>
								<th width='7%'>金额(元)</th>
								<th width='5%'>状态</th>
								<th width='20%'>错误信息</th>
								<th width='10%'>平台查询码</th>
							</tr>
						</thead>
						<tbody id = "alipayInfoList-tbody"></tbody>
					</table>
					<ul class="pagination"></ul>
				</div>
			</div>
			<!-- ****************************************编辑通知******************************************************* -->
			<div class="tab-pane" id="noticeEdit">
				<div class="panel panel-default">
					<div class="panel-heading">编辑通知公告</div>
					<div class="panel-body">
						<form role="form" class="form-horizontal">
							<div class="form-group" id="">
								<label for="noteTitle" class="col-sm-2 control-label">通知标题：</label>
								<div class="col-sm-6">
									<input type="text" class="form-control" name="noticeTitle" id="noticeTitle" placeholder="通知标题" required="required" autocomplete="off"> <span class="help-block"></span>
								</div>
							</div>
							<script type="text/plain" id="myEditor" style="width:1136px;height:240px;"></script>
						</form>
						<div style="margin:10px;">
							<button type="button" id="saveEdit" class="btn btn-primary btn-lg center-block">增加新说明</button>
						</div>
					</div>

				</div>

			</div>
			<!-- ----------------------------------------------文章列表--------------------------------------------------- -->
			<div class="tab-pane" id="articleList">
				<div class="panel panel-default">
					<div class="panel-heading" style="height: 38px;">	
						<!-- <span id="aduitingMarkTimeMonthTotle" class="pull-right text-success" style="padding-left: 20px;"></span>
						<span id="taskMarkTimeMonthTotle" class="pull-right text-success"></span> -->
					</div>
					<div class="panel-body">
						<form class="form-inline" role="form">	
							<div class="form-group">
								<div class="input-group" style="width: 300px;">
							    	<input class="form-control" onkeydown="if(event.keyCode==13){return false;}" id="articleTitle" type="text" placeholder="请输入要查询的文章标题">
							    	<span class="input-group-btn">
							    		<button type="button" id="searchForArticle" class="btn btn-default">查询</button>
							    	</span>
							    </div>
							</div>
							<div class="pull-right">
								<button type="button" id="articleOpenLogBtn" class="btn btn-info">浏览记录</button>
								<button type="button" id="checkUnreadMsgBtn" class="btn btn-default">查看回复 <span id="unreadMsgNumBadge" class="badge" style="background-color: #ce2323;font-weight: 100;"></span></button>
								<button type="button" id="ownedArticle" class="btn btn-warning">已发布文章</button>
								<button type="button" id="createArticle" class="btn btn-success">发表新文章</button>
							</div>
						</form>
						<div style="clear: both;"></div>
					</div>
					<table class="table table-striped table-bordered">
						<thead>
							<tr>
								<th colspan="6" style="text-align: left;">
									<span style="margin-left: 15px;">置顶&公告</span>
								</th>
							</tr>
							<tr>
								<th width='10%'>序号</th>
								<th width='50%'>标题</th>
								<th width='5%'>状态</th>
								<th width='10%'>作者</th>
								<th width='10%'>回复/浏览</th>
								<th width='15%'>发布时间</th>
							</tr>
						</thead>
						<tbody id = "articleTop-tbody">
						</tbody>
						<thead>
							<tr>
								<th colspan="6" style="text-align: left;">
									<span style="margin-left: 15px;">最新内容</span>
								</th>
							</tr>
						</thead>
						<tbody id = "articleList-tbody">
						</tbody>
					</table>
					<ul class="pagination"></ul>
				</div>
			</div>
		</div>
		</div>
		
		<!-- ------------------------------------------------------------------------------------------------- -->
		<div class="modal fade" id="changeUserStatusModal">
			<div class="modal-dialog">
				<div class="modal-content">
					<div class="modal-header">
						<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
						<h4 class="modal-title"></h4>
					</div>
					<div class="modal-body">
						<span id="updateStatus"></span>
						<form class="form-inline" role="form">
						<div class="form-group">
							<label class="radio-inline">
								<input type="radio" class="changeust" name="inlineRadioOptions" id="" value="1" autocomplete="off">可用
							</label>
					   </div>
					   <div class="form-group">
							<label class="radio-inline">
								<input type="radio" class="changeust" name="inlineRadioOptions" id="" value="0" autocomplete="off">禁用
							</label>
					   </div>
					   </form>
					</div>
					<div class="modal-footer">
						<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
						<button type="button" id="changeUserStatusBtn" class="btn btn-primary">修改</button>
					</div>
				</div><!-- /.modal-content -->
			</div><!-- /.modal-dialog -->
		</div><!-- /.modal -->
		
		
		<!-- cx20150106 changeManagerInform -->
		<div class="modal fade" id="changeManagerInform">
			<div class="modal-dialog">
				<div class="modal-content">
					<div class="modal-header">
						<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
						<h4 class="modal-title"></h4>
					</div>
					<div class="modal-body">
						<span id="updateStatus"></span>
						<div style="padding:10px 30px 10px;">
							<form class="form-inline" role="form">
								<div class="input-group" style="padding:3px 3px;">
	        					 	<span class="input-group-addon">最大下载数</span>
	         						<input type="text" class="form-control" id="downMaxCountInput" placeholder="请输入">
	      						</div>
	      						<div class="input-group" style="padding:3px 3px;">
	        					 	<span class="input-group-addon">单次下载数</span>
	         						<input type="text" class="form-control" id="downCountInput" placeholder="请输入">
	      						</div>
	      						<br>
	      						<div class="input-group" style="padding:3px 3px;">
	        					 	<span class="input-group-addon">文件过滤数</span>
	         						<input type="text" class="form-control" id="fileSizeInput" placeholder="请输入">
	      						</div>
	      						  <div class="input-group" style="padding:3px 3px;">
	        					 	<span class="input-group-addon">每小时薪金</span>
	         						<input type="text" class="form-control" id="salaryInput" placeholder="请输入">
	      						</div><!-- -->
						   </form>
					   </div>
					</div>
					<div class="modal-footer">
						<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
						<button type="button" id="changeManagerInformBtn" class="btn btn-primary">修改</button>
					</div>
				</div><!-- /.modal-content -->
			</div><!-- /.modal-dialog -->
		</div><!-- /.modal -->
		
		<!-- --------------------修改工作组名称---------------------------------------------------------- -->
		<div class="modal fade" id="changeWorkGroupNameModal">
			<div class="modal-dialog">
				<div class="modal-content">
					<div class="modal-header">
						<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
						<h4 class="modal-title">修改工作组名称</h4>
					</div>
					<div class="modal-body">
						<form class="form-inline" role="form">
						<div class="input-group" style="padding:3px 3px;">
	        				<span class="input-group-addon">工作组名称：</span>
	         				<input type="text" class="form-control" id="changeWorkGroupNameInput" placeholder="请输入">
	         				<input type="hidden" class="form-control" id="changeWorkGroupNameHiddenId" >
	      				</div>
					   </form>
					</div>
					<div class="modal-footer">
						<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
						<button type="button" id="changeWorkGroupNameBtn" class="btn btn-primary">修改</button>
					</div>
				</div><!-- /.modal-content -->
			</div><!-- /.modal-dialog -->
		</div><!-- /.modal -->
		<!-- --------------------修改工作组工资---------------------------------------------------------- -->
		<div class="modal fade" id="changeWorkGroupSalaryModal">
			<div class="modal-dialog">
				<div class="modal-content">
					<div class="modal-header">
						<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
						<h4 class="modal-title">修改工作组工资</h4>
					</div>
					<div class="modal-body">
						<form class="form-inline" role="form">
						<div class="input-group" style="padding:3px 3px;">
	        				<span class="input-group-addon">工资：</span>
	         				<input type="text" class="form-control" id="changeWorkGroupSalaryInput" placeholder="请输入">
	         				<input type="hidden" class="form-control" id="changeWorkGroupSalaryHiddenId" >
	         				<input type="hidden" class="form-control" id="layerNum" >
	      				</div>
					   </form>
					</div>
					<div class="modal-footer">
						<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
						<button type="button" id="changeWorkGroupSalaryBtn" class="btn btn-primary">修改</button>
					</div>
				</div><!-- /.modal-content -->
			</div><!-- /.modal-dialog -->
		</div><!-- /.modal -->
		<!-- --------------------添加工作组信息---------------------------------------------------------- -->
		<div class="modal fade" id="addWorkGroupInfoModal">
			<div class="modal-dialog">
				<div class="modal-content">
					<div class="modal-header">
						<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
						<h4 class="modal-title">添加工作组信息</h4>
					</div>
					<div class="modal-body">
						<form class="form-inline" role="form">
						<div class="input-group" style="padding:3px 3px;">
	        				<span class="input-group-addon">工作组名称：</span>
	         				<input type="text" class="form-control" id="addWorkGroupInfoName" placeholder="请输入">
	         			</div>
	         			<div class="input-group" style="padding:3px 3px;">
	         				<span class="input-group-addon">一层任务工资：</span>
	         				<input type="text" class="form-control" id="addWorkGroupInfoSalaryLayerOne" placeholder="请输入">
	         				<span class="input-group-addon">三层任务工资：</span>
	         				<input type="text" class="form-control" id="addWorkGroupInfoSalaryLayerThree" placeholder="请输入">
	      				</div>
					   </form>
					</div>
					<div class="modal-footer">
						<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
						<button type="button" id="addWorkGroupInfoSubmit" class="btn btn-primary">添加</button>
					</div>
				</div><!-- /.modal-content -->
			</div><!-- /.modal-dialog -->
		</div><!-- /.modal -->
		<!-- --------------------修改工作者姓名---------------------------------------------------------- -->
		<div class="modal fade" id="editRealNameModal">
			<div class="modal-dialog">
				<div class="modal-content">
					<div class="modal-header">
						<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
						<h4 class="modal-title">修改用户真实姓名</h4>
					</div>
					<div class="modal-body">
						<form class="form-inline" role="form">
						<div class="input-group" style="padding:3px 3px;">
							<div class="input-group" style="padding:3px 3px;">
								<span class="input-group-addon">原姓名：</span>
		         				<input type="text" class="form-control" id="oldRealName" readonly="readonly">
	      					</div>
	      					<div class="input-group" style="padding:3px 3px;">
		        				<span class="input-group-addon">新姓名：</span>
		         				<input type="text" class="form-control" id="newRealName" placeholder="请输入">
		         				<input type="hidden" class="form-control" id="realNameUserId" >
	         				</div>
	      				</div>
					   </form>
					</div>
					<div class="modal-footer">
						<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
						<button type="button" id="doEditRealName" class="btn btn-primary">修改</button>
					</div>
				</div><!-- /.modal-content -->
			</div><!-- /.modal-dialog -->
		</div><!-- /.modal -->
		<!-- --------------------修改一层任务补助比例---------------------------------------------------------- -->
		<div class="modal fade" id="changeOneLayerSubsidyModal">
			<div class="modal-dialog">
				<div class="modal-content">
					<div class="modal-header">
						<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
						<h4 class="modal-title">修改一层任务补助比例</h4>
					</div>
					<div class="modal-body">
						<form class="form-inline" role="form">
						<div class="input-group" style="padding:3px 3px;">
	        				<span class="input-group-addon">比例：</span>
	         				<input type="text" class="form-control" id="changeOneLayerSubsidyInput" placeholder="请输入">
	         				<input type="hidden" class="form-control" id="changeOneLayerSubsidyHiddenId" >
	         				<span class="input-group-addon">%</span>
	      				</div>
					   </form>
					</div>
					<div class="modal-footer">
						<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
						<button type="button" id="changeOneLayerSubsidyBtn" class="btn btn-primary">修改</button>
					</div>
				</div><!-- /.modal-content -->
			</div><!-- /.modal-dialog -->
		</div><!-- /.modal -->
		
	</div>
	<script type="text/javascript">
		var utDropdownOpen = false;
		var nowUserType = 4;
		var nowPage = 0;
		var userNameCondition = "";
		
		var alipayEnabled = 9;  //支付宝状态默认全部
		var taskUpload = 2;
		var userId = 0;
		var pageTotal = 0;
		var dateType = 1;
		var beginDate = "";
		var endDate = "";
		//等级条件
		var userNameConditionWorkerLvl = "";
		var userLvl = 0;
		//
		var userNameCondition1 = "";	
		var dateType1 = 2;
		var beginDate1 = "";
		var endDate1 = "";
		var salaryLine = 0;
		var payOffType = 2;//2:常规 0:未结 1:已结
		//工作组条件
		var workGroupNameCondition = "";
		var workGroupDateType = 2;
		var workGroupBeginDate = "";
		var workGroupEndDate = "";
		//审核信息条件
		var inspectionDetailBeginDate = "";
		var inspectionDetailEndDate = "";
		var inspectionDetailDateType = 2;
		//支付宝列表条件
		var alipayAccount = "";
		var payeeRealName = "";
		var alipayBeginDate = "";
		var alipayEndDate = "";
		var alipayDateType = 2;
		var alipayStatus = 9;
		//文章列表查询条件
		var searchTitle = "";
		window.UMEDITOR_CONFIG.imageUrl = "${contextPath}/security/uploadImage";
		var um = UM.getEditor('myEditor');
		
		$(document).ready(function(){
			
			var date = new Date();
			var todayDate = $.datepicker.formatDate( "yy-mm-dd",new Date());
			beginDate = todayDate;
			endDate = todayDate;
			beginDate1 = todayDate;
			endDate1 = todayDate;
			workGroupBeginDate = todayDate;
			workGroupEndDate = todayDate;
			alipayBeginDate = todayDate;
			alipayEndDate = todayDate;
			$("#beginDate,#endDate").val(todayDate);
			$("#beginDate1,#endDate1").val(todayDate);
			$("#workGroupBeginDate,#workGroupEndDate").val(todayDate);
			$("#inspectionDetailBeginDate,#inspectionDetailEndDate").val(todayDate);
			$("#alipayBeginDate,#alipayEndDate").val(todayDate);
//			chooseUserType(1);
			//结算按钮
			$("#payOffBtn").attr("disabled","disabled");
//			workerSalaryList(1);  //已经放置在工作组页面使用了
//			workerLvlList(1);
//			workGroupList(1);
			querySalarySettings();
			getWorkGroupSettingList();
			loadArticles(1);
			loadUnreadMsgNum();
			/*-------------------------------datepicker-----------------------------------------*/
			$.datepicker.regional[ "ch" ];
			$("#beginDate").datepicker({
				changeMonth:true,
				changeYear:true,
				numberOfMonths:1,
				setDate:todayDate,
				onClose: function( selectedDate ) {
					$( "#endDate" ).datepicker( "option", "minDate", selectedDate );
				}
			});
			$("#endDate").datepicker({
				changeMonth:true,
				changeYear:true,
				numberOfMonths:1,
				onClose: function( selectedDate ) {
					$( "#beginDate" ).datepicker( "option", "maxDate", selectedDate );
				}
			});
			$("#beginDate1").datepicker({
				changeMonth:true,
				changeYear:true,
				numberOfMonths:1,
				setDate:todayDate,
				onClose: function( selectedDate ) {
					$( "#endDate1" ).datepicker( "option", "minDate", selectedDate );
				}
			});
			$("#endDate1").datepicker({
				changeMonth:true,
				changeYear:true,
				numberOfMonths:1,
				onClose: function( selectedDate ) {
					$( "#beginDate1" ).datepicker( "option", "maxDate", selectedDate );
				}
			});
			$("#workGroupBeginDate").datepicker({
				changeMonth:true,
				changeYear:true,
				numberOfMonths:1,
				setDate:todayDate,
				onClose: function( selectedDate ) {
					$( "#workGroupEndDate" ).datepicker( "option", "minDate", selectedDate );
				}
			});
			$("#workGroupEndDate").datepicker({
				changeMonth:true,
				changeYear:true,
				numberOfMonths:1,
				onClose: function( selectedDate ) {
					$( "#workGroupBeginDate" ).datepicker( "option", "maxDate", selectedDate );
				}
			});
			$("#inspectionDetailBeginDate").datepicker({
				changeMonth:true,
				changeYear:true,
				numberOfMonths:1,
				setDate:todayDate,
				onClose: function( selectedDate ) {
					$( "#inspectionDetailEndDate" ).datepicker( "option", "minDate", selectedDate );
				}
			});
			$("#inspectionDetailEndDate").datepicker({
				changeMonth:true,
				changeYear:true,
				numberOfMonths:1,
				onClose: function( selectedDate ) {
					$( "#inspectionDetailBeginDate" ).datepicker( "option", "maxDate", selectedDate );
				}
			});
			$("#alipayBeginDate").datepicker({
				changeMonth:true,
				changeYear:true,
				numberOfMonths:1,
				setDate:todayDate,
				onClose: function( selectedDate ) {
					$( "#alipayEndDate" ).datepicker( "option", "minDate", selectedDate );
				}
			});
			$("#alipayEndDate").datepicker({
				changeMonth:true,
				changeYear:true,
				numberOfMonths:1,
				onClose: function( selectedDate ) {
					$( "#alipayBeginDate" ).datepicker( "option", "maxDate", selectedDate );
				}
			});			
			
			/*--------------------------------------点击查询按钮-------------------------------------------------------*/
			$("#searchBtn").click(function(){
				dateType = $("#dateTypeCheck").val();
				beginDate = $("#beginDate").val();
				endDate = $("#endDate").val();
				taskUpload = $("#taskUpload").val();
				alipayEnabled = $("#alipayEnabled").val();
				userNameCondition = $("#userNameCondition").val();
				chooseUserType(1);
			});
			$("#searchSalaryBtn").click(function(){
				dateType1 = $("#dateTypeCheck1").val();
				beginDate1 = $("#beginDate1").val();
				endDate1 = $("#endDate1").val();
				salaryLine = $("#salaryLine").val();
				payOffType = $("#payOffType").val();
				if(salaryLine.length == 0){
					salaryLine = 0;
				}
				userNameCondition1 = $("#userNameCondition1").val();
				//
				var noPay = $("#payOffType").val();
				if(noPay == 0){
					$("#payOffBtn").removeAttr("disabled");
				}else{
					$("#payOffBtn").attr("disabled","disabled");
				}	
				workerSalaryList(1);
			});
			/*---------------------查询等级列表-------------------------------*/
			$("#searchWorkerLvlBtn").click(function(){
				userNameConditionWorkerLvl = $("#userNameConditionWorkerLvl").val();
				userLvl = $("#userLvl").val();	
				workerLvlList(1);
			});
			/*---------------------查询工作组列表-----------------------------*/
			$("#workGroupSearchBtn").click(function(){
				workGroupDateType = $("#workGroupDateTypeCheck").val();
				workGroupBeginDate = $("#workGroupBeginDate").val();
				workGroupEndDate = $("#workGroupEndDate").val();
				workGroupNameCondition = $("#workGroupNameCondition").val();
				workGroupList(1);
			});
			/*---------------------查询审核信息列表-----------------------------*/
			$("#inspectionDetailSearchBtn").click(function(){
				inspectionDetailDateType = $("#inspectionDetailDateTypeCheck").val();
				inspectionDetailBeginDate = $("#inspectionDetailBeginDate").val();
				inspectionDetailEndDate = $("#inspectionDetailEndDate").val();
				inspectionDetailList();
			});
			/*---------------------48小时超时信息列表-----------------------------*/
			$("#inspectionOvertimeRecordSearchBtn").click(function(){
				inspectionDetailDateType = $("#inspectionDetailDateTypeCheck").val();
				inspectionDetailBeginDate = $("#inspectionDetailBeginDate").val();
				inspectionDetailEndDate = $("#inspectionDetailEndDate").val();
				inspectionOvertimeRecordList();
			});
			/*---------------------审核有效时间信息列表-----------------------------*/
			$("#inspectionMarkTimeRecordSearchBtn").click(function(){
				inspectionDetailDateType = $("#inspectionDetailDateTypeCheck").val();
				inspectionDetailBeginDate = $("#inspectionDetailBeginDate").val();
				inspectionDetailEndDate = $("#inspectionDetailEndDate").val();
				inspectionMarkTimeRecordList();
			});
			/*---------------------支付宝支付列表-----------------------------*/
			$("#alipaySearchBtn").click(function(){
				alipayAccount = $("#alipayAccount").val();
				payeeRealName = $("#payeeRealName").val();
				alipayBeginDate = $("#alipayBeginDate").val();
				alipayEndDate = $("#alipayEndDate").val();
				alipayDateType = $("#alipayDateTypeCheck").val();
				alipayStatus = $("#alipayStatus").val();
				queryAlipayList(1);
			});
			/*---------------------工资结算节点设置-----------------------------*/
			$("#salaryCountTimingBtn").click(function(){
				updateSalarySettings(1);//更新结算节点  自营
			});
			$("#outsourcerSalaryCountTimingBtn").click(function(){
				updateSalarySettings(2);//更新结算节点  外包
			});
			/*--------------------------------------cx点击设置按钮-------------------------------------------------------*/
			$("#changeBtn").click(function(){
				$.ajax({
				type:'POST',
				url:'${contextPath}/security/getManager',
				dataType:'json',
				success:function(data){
					$("#downMaxCountInput").attr("value",data.manager.downMaxCount);
					$("#downCountInput").attr("value",data.manager.downCount);
					$("#fileSizeInput").attr("value",data.manager.fileSize);
					$("#salaryInput").attr("value",data.manager.salary);
				}
			});
				$(".modal-title").text("修改下载数值,文件尺寸,金额等, 下载数值为全局设置");
				$("#changeManagerInform").modal('show');
			});
			/*--------------------------------------点击更改用户状态-------------------------------------------------------*/
			$("#changeUserStatusBtn").click(function(){
				var ust = $(".changeust:checked").val();
				var ustv = "不可用";
				if(ust == 1)ustv = "可用";
				$.ajax({
					type:'POST',
					data:{"userId":userId,"userStatus":ust},
					url:'${contextPath}/security/userStatus',
					dataType:'json',
					success:function(data){
						if(data.replay == 1){
							$("#updateStatus").addClass("text-success").text(data.message);
							$("#usta"+userId+"").text(ustv);
						}else{
							$("#updateStatus").addClass("text-danger").text(data.message);
						}
					}
				});
			});
			$("#changeUserStatusModal").on('hidden.bs.modal', function (e) {
				$("#updateStatus,.modal-title").empty();
				$(".radio-inline input").attr("checked"," ");
			});
			
		});
		/*--------------------------------------更改用户状态-------------------------------------------------------*/
		changeUserStatus = function(uId,userStatus,username){
			userId = uId;
			$(".modal-title").text("修改"+username+"状态");
			if(userStatus == 1){
				$(".radio-inline input[value=1]").attr("checked","checked");
			}else{
				$(".radio-inline input[value=0]").attr("checked","checked");
			}
			$("#changeUserStatusModal").modal('show');
			
		};
		/*--------------------------------------cx更改下载数值,文件尺寸,金额等--------------------------------------------*/
		$("#changeManagerInformBtn").click(function(){
			var downMaxCount = $("#downMaxCountInput").val();
			var downCount = $("#downCountInput").val();
			var fileSize = $("#fileSizeInput").val();
			var salaryChange = $("#salaryInput").val();
			$.ajax({
				type:'POST',
				data:{"downMaxCount":downMaxCount,"downCount":downCount,"fileSize":fileSize,"salary":salaryChange},
				url:'${contextPath}/security/updateCount',
				dataType:'json',
				success:function(data){
					if(data.replay == 1){
						alert("修改成功");
					}
				}
			});
		});
		/*--------------------------------------用户列表页-------------------------------------------------------*/
		chooseUserType = function(pageNum){
			$.ajax({
				type:'POST',
				data:{"userType":nowUserType,"page":pageNum,"userNameCondition":userNameCondition,"taskUpload":taskUpload,"dateType":dateType,"beginDate":beginDate,"endDate":endDate,"alipayEnabled":alipayEnabled},
				url:'${contextPath}/security/manager',
				dataType:'json',
				success:function(data){
					$("#user-tbody").empty();
					if(data.list == ""){
						$("#user-tbody").empty();
						$("#user-tbody").append("<tr class='text-danger'><td colspan='11'>无内容</td></tr>");
						var pageDom = $("#workerList .pagination");
						pageDom.empty();
					}else{
						pageTotal = data.totlePage;
						$.each(data.list,function(i,item){
							var status = "不可用";
							if(item.userStatus == "1")status = "可用";
							var alipayStatus = "";
							if(item.alipayEnabled == "1"){
								alipayStatus = "<td><span style='color:green;cursor:pointer;' onclick='changeAlipayStatus("+item.workerId+","+item.alipayEnabled+","+pageNum+");'>启用</span></td>";
							}else{
								alipayStatus = "<td><span style='color:red;cursor:pointer;' onclick='changeAlipayStatus("+item.workerId+","+item.alipayEnabled+","+pageNum+");'>未启用</span></td>";
							}
							$("#user-tbody").append(
								"<tr>"+
									"<td>"+(i+1)+"</td>"+
									"<td><a target='_blank' href='${contextPath}/security/workerDetail?userId="+item.userId+"&username="+item.username+"'>"+item.username+"</a></td>"+
									"<td><a href='#' onclick='toEditRealName("+item.userId+",\""+item.realName+"\");'>"+item.realName+"</a></td>"+
									"<td>"+item.phone+"</td>"+
									"<td id = markTime"+i+">"+ "-" +"</td>"+
									"<td id = waitingMarkTime"+i+">"+ "-" +"</td>"+
									"<td id = downCount"+i+">"+ "-" +"</td>"+
									"<td id = finishCount"+i+">"+ "-" +"</td>"+
									"<td class='userStatus'><a id='usta"+item.userId+"' href='#' onClick='changeUserStatus("+item.userId+","+item.userStatus+",\""+item.username+"\")'>"+status+"</a></td>"+
									"<td id = referralNum"+i+">"+ "-" +"</td>"+
									alipayStatus+
								"</tr>"
							);
							var pageDom = $("#workerList .pagination");
							pageDom.empty();
							page.creatPageHTML(pageNum,pageTotal,pageDom,"chooseUserType");
							/*--------------------------------------跳转页-------------------------------------------------------*/
							$("#workerList .pageGoBtn").click(function(){
								var pageNum = 0;
								pageNum = $("#workerList .pageGoText").val();
								if(pageNum !=0&&0<pageNum&&pageNum<pageTotal+1){
									chooseUserType(pageNum);
								}
							});
							/*-------------------------------------异步获取数据--------------------------------------------*/			
							getMarkTime(item.userId,i,nowUserType,pageNum,userNameCondition,taskUpload,dateType,beginDate,endDate);			
						});
						getMarkTimeTotle(userNameCondition,taskUpload,dateType,beginDate,endDate);
					}
				}
			});
		};
		/*----------------------------------------------用户薪金页----------------------------------------------------------------*/
		workerSalaryList = function(pageNum){
			$.ajax({
				type:'POST',
				data:{"page":pageNum,"userNameCondition":userNameCondition1,"dateType":dateType1,"beginDate":beginDate1,"endDate":endDate1,"salaryLine":salaryLine,"payOffType":payOffType,"workGroupCode":"000001"},
				url:'${contextPath}/security/workerSalary',
				dataType:'json',
				success:function(data){
					$("#workerSalary-tbody").empty();			
					if(data.list == ""){
						$("#workerSalary-tbody").empty();
						$("#workerSalarList .pageGoBtn").empty();
						$("#workerSalary-tbody").append("<tr class='text-danger'><td colspan='6'>无内容</td></tr>");
					}else{
						pageTotal = data.totlePage; 
						$.each(data.list,function(i,item){
							$("#workerSalary-tbody").append(
							"<tr>"+
								"<td>"+(i + 1)+"</td>"+
								"<td>"+item.realName+"</td>"+
								"<td>"+item.bankCard+"</td>"+
								"<td>"+item.taskMarkTimeMonth  +"</td>"+
								"<td id = salary"+ item.workerId +">"+item.salary+"</td>"+
								"<td><input type='checkbox' class='checkbox1' name='checkbox1' value='"+item.workerId+"'/></td>"+
							"</tr>"
							);
							getSalary(item.workerId,item.salary);			
						});
						//getSumSalary(userNameCondition1,dateType1,beginDate1,endDate1,salaryLine,payOffType);
						
						var pageDom = $("#workerSalarList .pagination");
							pageDom.empty();
							page.creatPageHTML(pageNum,pageTotal,pageDom,"workerSalaryList");
							/*--------------------------------------跳转页-------------------------------------------------------*/
							$("#workerSalarList .pageGoBtn").click(function(){
								var pageNum = 0;
								pageNum = $("#workerSalarList .pageGoText").val();
								if(pageNum !=0&&0<pageNum&&pageNum<pageTotal+1){
									workerSalaryList(pageNum);
								}
							});					
					}
				}
			});
		};
		/*-----------------------------------------------获得薪金---------------------------------------------------------------*/
		getSalary = function(workerId,salary){
			$.ajax({
				type:'POST',
				data:{"workerId":workerId},
				url:'${contextPath}/security/salaryByWorkerId',
				dataType:'json',
				success:function(data){
					$("salary"+workerId).text(data);
				}
			});
		};
		/*----------------------------------------------用户等级页----------------------------------------------------------------*/
		workerLvlList = function(pageNum){
			userLvl = $("#userLvl").val();
			$.ajax({
				type:'POST',
				data:{"page":pageNum,"userNameCondition":userNameConditionWorkerLvl,"userLvl":userLvl},
				url:'${contextPath}/security/workerLvl',
				dataType:'json',
				success:function(data){
					$("#workerLvl-tbody").empty();			
					if(data.list == ""){
						$("#workerLvl-tbody").empty();
						$("#workerLvlList .pageGoBtn").empty();
						$("#workerLvl-tbody").append("<tr class='text-danger'><td colspan='6'>无内容</td></tr>");
					}else{
						pageTotal = data.totlePage; 
						$.each(data.list,function(i,item){
							$("#workerLvl-tbody").append(
							"<tr>"+
								"<td>"+(i + 1)+"</td>"+
								"<td>"+item.username+"</td>"+
								"<td>"+item.wrn+"</td>"+
								"<td>"+item.uln+"</td>"+
								"<td><input type='checkbox' class='checkbox1Lvl' name='checkbox1Lvl' value='"+item.workerId+"'/></td>"+
							"</tr>"
							);			
						});
						//getSumSalary(userNameCondition1,dateType1,beginDate1,endDate1,salaryLine,payOffType);
						var pageDom = $("#workerLvlList .pagination");
							pageDom.empty();
							page.creatPageHTML(pageNum,pageTotal,pageDom,"workerLvlList");
							/*--------------------------------------跳转页-------------------------------------------------------*/
							$("#workerLvlList .pageGoBtn").click(function(){
								var pageNum = 0;
								pageNum = $("#workerLvlList .pageGoText").val();
								if(pageNum !=0&&0<pageNum&&pageNum<pageTotal+1){
									workerLvlList(pageNum);
								}
							});					
					}
				}
			});
		};
		/*--------------------------------------全选-----------------------------------------------------------------*/
		$("#choose").click(function(){
			var choose = $("#choose-p").text();
			if(choose == "全选"){
				$(".checkbox1").prop("checked",true);
				$("#choose-p").text("取消");
			}else{
				$(".checkbox1").prop("checked",false);
				$("#choose-p").text("全选");
			}
		});
		/*****************等级**********************/
		$("#chooseLvl").click(function(){
			var choose = $("#choose-lvl").text();
			if(choose == "全选"){
				$(".checkbox1Lvl").prop("checked",true);
				$("#choose-lvl").text("取消");
			}else{
				$(".checkbox1Lvl").prop("checked",false);
				$("#choose-lvl").text("全选");
			}
		});
		/*---------------------------------------等级设置---------------------------------------------------------------*/
		$("#updateWorkerLvlBtn").click(function(){
			userLvl = $("#userLvl").val();
			var userLavlName = $("#userLvl option[value="+userLvl+"]").text();	
				if(userLvl > 0){
					var conWin = confirm("确定要设置到"+userLavlName+"吗?");
					if(conWin){
						var checkList = $(".checkbox1Lvl");
						var l = checkList.length;
						var str="";
						for(var i=0;i<l;i++){
							if (checkList[i].checked == true) {
								var workerId = checkList[i].value;
								str =workerId +"/"+str;
			        		}
						}		
						if(str.length == 0){
							alert("请选择要设置用户!!!");
						}else{
							updateWorkerLvl(str);
						}
					}
				}else{
					alert("请选择要设置的等级!!!");
				}
				
		});
		updateWorkerLvl= function(str){
			$.ajax({
				type:'POST',
				data:{"workerIds":str,"userLvl":userLvl},
				url:'${contextPath}/security/updateWorkerLvl',
				dataType:'json',
				success:function(data){
					var replay = data.replay;
					if(replay>0){
						alert("等级设置完成!");
					}else{
						alert("等级设置失败!");
					}
					workerLvlList(1);	
				}	
			});
		};
		/*---------------------------------------结算---------------------------------------------------------------*/
		$("#payOffBtn").click(function(){
			payOffType = $("#payOffType").val();
			if(payOffType == 0){
				var conWin = confirm("确定要执行结算吗？");
				if(conWin){
					var checkList = $(".checkbox1");
					var l = checkList.length;
					var str="";
					for(var i=0;i<l;i++){
						if (checkList[i].checked == true) {
							var workerId = checkList[i].value;
							str = workerId +"/"+str;
		        		}
					}
					
					dateType1 = $("#dateTypeCheck1").val();
					beginDate1 = $("#beginDate1").val();
					endDate1 = $("#endDate1").val();				
					payOff(str);	
				}
			}else{
				alert("现在显示的不是未结数据,不能进行结算!!");
			}	
		});
		/*--------------------------------------结算工资-------------------------------------------*/
		payOff = function(str){
			$.ajax({
				type:'POST',
				data:{"workerIds":str,"dateType":dateType1,"beginDate":beginDate1,"endDate":endDate1},
				url:'${contextPath}/security/payOff',
				dataType:'json',
				success:function(data){
					var replay = data.replay;
					if(replay>0){
						alert("结算工资完成!");
					}else{
						alert("结算工资出错!");
					}
					workerSalaryList(1);	
				}	
			});
		};
		/*--------------------------------------获得语音标注总和-------------------------------------------*/
		getMarkTimeTotle = function(userNameCondition,taskUpload,dateType,beginDate,endDate){
			$.ajax({
				type:'POST',
				data:{"userNameCondition":userNameCondition,"taskUpload":taskUpload,"dateType":dateType,"beginDate":beginDate,"endDate":endDate},
				url:'${contextPath}/security/getMarkTimeTotle',
				dataType:'json',
				success:function(data){
					var taskMarkTimeMonthTotle = data.taskMarkTimeMonthTotle;
					var aduitingMarkTimeMonthTotle = data.aduitingMarkTimeMonthTotle;			
					$("#aduitingMarkTimeMonthTotle").text("待审标注："+aduitingMarkTimeMonthTotle);
					$("#taskMarkTimeMonthTotle").text("有效标注："+taskMarkTimeMonthTotle);
				}
			});
		};
		getSumSalary = function(userNameCondition,dateType,beginDate,endDate,salaryLine,payOffType){
			$.ajax({
				type:'POST',
				data:{"userNameCondition":userNameCondition,"dateType":dateType,"beginDate":beginDate,"endDate":endDate,"salaryLine":salaryLine,"payOffType":payOffType},
				url:'${contextPath}/security/getSumSalary',
				dataType:'json',
				success:function(data){
//					var sumSalary = data.sumSalary;			
//					$("#taskMarkTimeMonthTotle1").text("有效标注："+(sumSalary/3600).toFixed(2)+" 小时");
//					$("#aduitingMarkTimeMonthTotle1").text("总金额："+(sumSalary*data.salary/3600).toFixed(2)+" 元");
					$("#taskMarkTimeMonthTotle1").text("有效标注："+data.markTime+" 小时");
					$("#aduitingMarkTimeMonthTotle1").text("总金额："+data.salary+" 元");
				}
			});
		};
		/*
		数据显示顺序
		downCount+"/"+unUploadCount+"/"+waitingCount
		finishCount+"/"+giveUpCount+"/"+oldCount
		*/
		getMarkTime = function(userId,i,nowUserType,pageNum,userNameCondition,taskUpload,dateType,beginDate,endDate){
			$.ajax({
				type:'POST',
				data:{"userId":userId,"userType":nowUserType,"page":pageNum,"userNameCondition":userNameCondition,"taskUpload":taskUpload,"dateType":dateType,"beginDate":beginDate,"endDate":endDate},
				url:'${contextPath}/security/getMarkTime',
				dataType:'json',
				success:function(data){
					$("#markTime"+i).text(data.markTime);
					$("#waitingMarkTime"+i).text(data.waitMarkTime);
					$("#downCount"+i).text(data.downCount+"/"+data.unUpLoadCount+"/"+data.waitingEffectiveCount);
					$("#finishCount"+i).text(data.finishCount+"/"+data.giveUpCount+"/"+data.oldCount);
					$("#referralNum"+i).html("<a target='_blank' href='${contextPath}/security/getViewOfReferrals?userId="+userId+"'>"+data.referralNum+"</a>");  //显示推荐过的人数
				}
			});
		};
		/*------------------------------------------工作组列表---------------------------------------*/
		workGroupList = function(pageNum){
			$.ajax({
				type:'POST',
				data:{"page":pageNum,"workGroupNameCondition":workGroupNameCondition,"dateType":workGroupDateType,"beginDate":workGroupBeginDate,"endDate":workGroupEndDate},
				url:'${contextPath}/security/workGroupList', 
				dataType:'json',
				success:function(data){
					$("#workerGroup-tbody").empty();			
					if(data.list == ""){
						$("#workerGroup-tbody").empty();
						$("#workGroupList .pageGoBtn").empty();
						$("#workerGroup-tbody").append("<tr class='text-danger'><td colspan='6'>无内容</td></tr>");
					}else{
						pageTotal = data.totlePage; 
						$.each(data.list,function(i,item){
							$("#workerGroup-tbody").append(
							"<tr>"+
								"<td>"+(i + 1)+"</td>"+
								"<td>"+item.workGroupName+"</td>"+
								"<td>"+(item.taskMarkTimeMonth/3600).toFixed(2)+"</td>"+
								"<td>"+item.salary  +"</td>"+
								"<td>"+item.workerNum+"</td>"+
								"<td><a target='_blank' href='${contextPath}/security/workGroupSalaryDetails?workGroupCode="+item.workGroupCode+"&workGroupName="+item.workGroupName+"&dateType="+workGroupDateType+"&beginDate="+workGroupBeginDate+"&endDate="+workGroupEndDate+"'>工资信息</a></td>"+
								"<td><a target='_blank' href='${contextPath}/security/workGroupUploadTimeDetails?workGroupCode="+item.workGroupCode+"&workGroupName="+item.workGroupName+"&dateType="+workGroupDateType+"&beginDate="+workGroupBeginDate+"&endDate="+workGroupEndDate+"'>上传时间信息</a></td>"+
							"</tr>"
							);		
						});
						getSumSalary("",workGroupDateType,workGroupBeginDate,workGroupEndDate,0,2);
						var pageDom = $("#workGroupList .pagination");
						pageDom.empty();
						page.creatPageHTML(pageNum,pageTotal,pageDom,"workGroupList");
						/*--------------------------------------跳转页-------------------------------------------------------*/
						$("#workGroupList .pageGoBtn").click(function(){
							var pageNum = 0;
							pageNum = $("#workGroupList .pageGoText").val();
							if(pageNum !=0&&0<pageNum&&pageNum<pageTotal+1){
								workGroupList(pageNum);
							}
						});			
					}
				}
			});
		};
		/*------------------------------------------审核信息列表---------------------------------------*/
		inspectionDetailList = function(){
			$.ajax({
				type:'POST',
				data:{"dateType":inspectionDetailDateType,"beginDate":inspectionDetailBeginDate,"endDate":inspectionDetailEndDate},
				url:'${contextPath}/security/inspectionDetail', 
				dataType:'json',
				success:function(data){
					$("#workerDoneTaskNum").html(data.doneNum);
					$("#inspectionDetail-tbody").empty();			
					if(data.list == ""){
						$("#inspectionDetail-tbody").empty();
						$("#inspectionDetail-tbody").append("<tr class='text-danger'><td colspan='3'>无内容</td></tr>");
					}else{
						$.each(data.list,function(i,item){
							var inspType = "";
							var checkNum = "";
							var checkFlag = "";
							var dLCount = "";
							if(item.taskEffective == 0){
								inspType = "未审核/待初审";
								checkNum = "-";
								$("#notInspectTaskNum").html(item.taskNum);
								checkFlag = "-";
								dLCount = "-";
							}else if(item.taskEffective == 3){
								inspType = "已初审待巡审";
								checkNum = item.inspByUserNum;
								checkFlag = "初审比例";
								dLCount = data.downCountMap.inspByUserDLCount;
							}else if(item.taskEffective == 4){
								inspType = "已巡审待包审";
								checkNum = item.inspByDayNum;
								checkFlag = "巡审比例";
								dLCount = data.downCountMap.inspByDayDLCount;
							}else if(item.taskEffective == 1){
								inspType = "审核完成";
								checkNum = item.inspByPackageNum;
								checkFlag = "包审比例";
								dLCount = data.downCountMap.inspByPackageDLCount;
							}
							var checkPercent = 0;
							if(checkNum!=0&&checkNum!="-"){
								checkPercent = ((checkNum/item.taskNum)*100).toFixed(2)+"%";
							}else{
								checkPercent = "-";
							}
							$("#inspectionDetail-tbody").append(
							"<tr>"+
								"<td>"+inspType+"</td>"+
								"<td>"+item.taskNum  +"</td>"+
								"<td>"+checkNum+"</td>"+
								"<td>"+checkFlag+"</td>"+
								"<td>"+checkPercent+"</td>"+
								"<td>"+dLCount+"</td>"+
							"</tr>"
							);		
						});
					}
				}
			});
		};
		/*------------------------------------------审核48小时超时列表---------------------------------------*/
		inspectionOvertimeRecordList = function(){
			$.ajax({
				type:'POST',
				data:{"dateType":inspectionDetailDateType,"beginDate":inspectionDetailBeginDate,"endDate":inspectionDetailEndDate},
				url:'${contextPath}/security/queryInspectionOvertimeRecords', 
				dataType:'json',
				success:function(data){
					$("#inspectionOvertimeRecord-tbody").empty();			
					if(data.list == null){
						$("#inspectionOvertimeRecord-tbody").empty();
						$("#inspectionOvertimeRecord-tbody").append("<tr class='text-danger'><td colspan='4'>无内容</td></tr>");
					}else{
						$.each(data.list,function(i,item){
							$("#inspectionOvertimeRecord-tbody").append(
							"<tr>"+
								"<td>"+(i+1)+"</td>"+
								"<td>"+item.num1+"</td>"+
								"<td>"+item.num2+"</td>"+
								"<td>"+item.createTime+"</td>"+
							"</tr>"
							);		
						});
					}
				}
			});
		};
		/*-----------------------------------------结算设置---------------------------------------------*/
		//显示信息
		querySalarySettings = function(){
			$.ajax({
				type:'POST',
				url:'${contextPath}/security/querySalarySettings', 
				dataType:'json',
				success:function(data){
					$("#salaryCountTiming option").each(function(){
						var this_val = $(this).val();
						if(this_val==data.sctValue){
							$(this).attr("selected","selected");
						}else{
							$(this).removeAttr("selected","selected");
						}
					});
					$("#outsourcerSalaryCountTiming option").each(function(){
						var this_val = $(this).val();
						if(this_val==data.osctValue){
							$(this).attr("selected","selected");
						}else{
							$(this).removeAttr("selected","selected");
						}
					});
				}
			});
		};
		//更新结算节点
		updateSalarySettings = function(updateType){
			var select_val = "";
			if(updateType == 1){
				select_val = $("#salaryCountTiming").val();
			}else{
				select_val = $("#outsourcerSalaryCountTiming").val();
			}
			$.ajax({
				type:'POST',
				data:{"salaryCountTiming":select_val,"updateType":updateType},
				url:'${contextPath}/security/updateSalarySettings', 
				dataType:'json',
				success:function(data){
					alert(data.msg);
				}
			});
		};
		/*-----------------------------------------工作组管理列表---------------------------------------------*/
		getWorkGroupSettingList = function(){
			$.ajax({
				type:'POST',
				url:'${contextPath}/security/getWorkGroupSettingList', 
				dataType:'json',
				success:function(data){
					$("#workGroupSetting-tbody").empty();			
					if(data.list == ""){
						$("#workGroupSetting-tbody").empty();
						$("#workGroupSetting-tbody").append("<tr class='text-danger'><td colspan='11'>无内容</td></tr>");
					}else{
						var osCodeArray = data.osCode.split(",");
						$.each(data.result,function(i,item){
							var tempFlag = false;
							for ( var n = 0; n < osCodeArray.length; n++) {
								if(item.paramValue == osCodeArray[n]){
									tempFlag = true;
								}
							}
							var outsourcerTD;
							if(tempFlag){
								outsourcerTD = "<td><input class='isOutsourcerCheckbox' type='checkbox' checked value='"+item.paramValue+"'/></td>";
							}else{
								outsourcerTD = "<td><input class='isOutsourcerCheckbox' type='checkbox' value='"+item.paramValue+"'/></td>";
							}	
							var isActiveTD;
							if(item.isActive){
								isActiveTD = "<td><span title='点击禁用' style='color:green; cursor:pointer;' onclick='changeWorkGroupIsActive("+item.id+");'>已启用</span></td>";
							}else{
								isActiveTD = "<td><span title='点击启用' style='color:red; cursor:pointer;' onclick='changeWorkGroupIsActive("+item.id+");'>未启用</span></td>";
							}
							var oneLayerSalary = item.remarks.split("/")[0];
							var threeLayerSalary = item.remarks.split("/")[1];
							var oneLayerSubsidy = (item.backup2*100).toFixed(0);
							$("#workGroupSetting-tbody").append(
							"<tr>"+
								"<td>"+(i + 1)+"</td>"+
								"<td><span title='点击修改工作组名称' style='cursor:pointer;' onclick='changeWorkGroupName(this,"+item.id+");'>"+item.paramName+"</span></td>"+
								"<td><span title='此项不可修改'  >"+item.paramValue+"</span></td>"+
								"<td><a href='javascript:void(0);' title='点击修改工资' onclick='changeWorkGroupSalary(this,"+item.id+",1);'>"+oneLayerSalary+"</a></td>"+
								"<td><a href='javascript:void(0);' title='点击修改工资' onclick='changeWorkGroupSalary(this,"+item.id+",3);'>"+threeLayerSalary+"</a></td>"+
								"<td><a href='javascript:void(0);' title='点击修改补贴比例' onclick='changeOneLayerSubsidy(this,"+item.id+");'>"+oneLayerSubsidy+"</a></td>"+
								isActiveTD+
								outsourcerTD+
								"<td id='notReturnTotal_"+item.paramValue+"'>-</td>"+
								"<td id='notUploadNum_"+item.paramValue+"'>-</td>"+
								"<td id='waitInspNum_"+item.paramValue+"'>-</td>"+
								"<td id='waitInspModificationNum_"+item.paramValue+"'>-</td>"+
							"</tr>"
							);			
						});			
					}
				}
			});
		};
		changeWorkGroupSalary = function(obj,id,layerNum){
			if(confirm("请确认是否要修改工资?")){
				$("#changeWorkGroupSalaryInput").val($(obj).html());
				$("#changeWorkGroupSalaryHiddenId").val(id);
				$("#layerNum").val(layerNum);
				$("#changeWorkGroupSalaryModal").modal('show');
			}
		};
		$("#changeWorkGroupSalaryBtn").click(function(){
			var salary = $("#changeWorkGroupSalaryInput").val();
			var paramId = $("#changeWorkGroupSalaryHiddenId").val();
			var layerNum = $("#layerNum").val();
			salary=salary.replace(/\s/g, '');
			if(salary.length==0){
				alert("请填写工资!");
				return false;
			}
			if(salary<0){
				alert("工资不能小于零!");
				return false;
			}
			if(isNaN(salary)){
				alert("请填写数字!");
				return false;
			}
			$.ajax({
				type:'POST',
				data:{"salary":salary,"paramId":paramId,"layerNum":layerNum},
				url:'${contextPath}/security/modifyWorkGroupSalary',
				dataType:'json',
				success:function(data){
					if(data.replay == 1){
						getWorkGroupSettingList();
						alert("修改成功");
					}else{
						alert("修改失败, 请联系系统维护人员!");
					}
				}
			});
		});
		/* 修改工作组是否启用  */
		changeWorkGroupIsActive = function(id){
			var flag = confirm("该操作会修改工作组以及工作组中所有工作者账号的状态! \r确定修改吗?");
			if(flag){
				$.ajax({
					type:'POST',
					data:{"paramId":id},
					url:'${contextPath}/security/modifyWorkGroupActivity',
					dataType:'json',
					success:function(data){
						if(data.replay == 1){
							getWorkGroupSettingList();
							alert("工作组与组内工作者账号状态已修改!");
						}else{
							alert("修改状态失败,请联系系统维护人员!");
						}
					}
				});
			}
		};
		/*  添加工作组  */
		$("#addWorkGroupInfoBtn").click(function(){
			$("#addWorkGroupInfoName").val("");
			$("#addWorkGroupInfoSalaryLayerOne").val("");
			$("#addWorkGroupInfoSalaryLayerThree").val("");
			$("#addWorkGroupInfoModal").modal('show');
		});
		
		$("#addWorkGroupInfoSubmit").click(function(){
			var workGroupName = $("#addWorkGroupInfoName").val();
			var salary1 = $("#addWorkGroupInfoSalaryLayerOne").val();
			var salary3 = $("#addWorkGroupInfoSalaryLayerThree").val();
			
			if(workGroupName.length==0){
				alert("请填写工作组名称!");
				return false;
			}
			if(salary1.length==0||salary3.length==0){
				alert("请填写工资!");
				return false;
			}
			if(salary1<0||salary3<0){
				alert("工资不能小于零!");
				return false;
			}
			if(isNaN(salary1)||isNaN(salary3)){
				alert("请填写数字!");
				return false;
			}
			var salary = salary1+"/"+salary3;
			$.ajax({
				type:'POST',
				data:{"salary":salary,"workGroupName":workGroupName},
				url:'${contextPath}/security/addWorkGroupInfo',
				dataType:'json',
				success:function(data){
					if(data.replay == 1){
						getWorkGroupSettingList();
						alert("添加成功!");
					}else if(data.replay == 2){
						alert("工作组名称已存在,请不要重复添加!");
					}else{
						alert("添加工作组信息失败,请联系系统维护人员!");
					}
				}
			});
		});
		/*   修改工作组名称  */
		changeWorkGroupName = function(obj,id){
			$("#changeWorkGroupNameInput").val($(obj).html());
			$("#changeWorkGroupNameHiddenId").val(id);
			$("#changeWorkGroupNameModal").modal('show');
		};
		$("#changeWorkGroupNameBtn").click(function(){
			var wgName = $("#changeWorkGroupNameInput").val();
			var paramId = $("#changeWorkGroupNameHiddenId").val();
			wgName=wgName.replace(/\s/g, '');
			if(wgName.length==0){
				alert("请填写工作组名称!");
				return false;
			}
			
			$.ajax({
				type:'POST',
				data:{"wgName":wgName,"paramId":paramId},
				url:'${contextPath}/security/modifyWorkGroupName',
				dataType:'json',
				success:function(data){
					if(data.replay == 1){
						getWorkGroupSettingList();
						alert("修改成功");
					}else if(data.replay == 2){
						alert("工作组名称已存在!");
					}else{
						alert("修改失败, 请联系系统维护人员!");
					}
				}
			});
		});
		function changeAlipayStatus(workerId,alipayStatus,pageNum){
			$.ajax({
				type:'POST',
				data:{"workerId":workerId,"alipayStatus":alipayStatus},
				url:'${contextPath}/security/changeAlipayStatus',
				dataType:'json',
				success:function(data){
					if(data.replay == 1){
						chooseUserType(pageNum);
					}else{
						alert("修改状态失败,请联系系统维护人员!");
					}
				}
			});
		}
		/*------------------------------------------支付宝支付列表---------------------------------------*/
		queryAlipayList = function(pageNum){
			$.ajax({
				type:'POST',
				data:{"page":pageNum,"alipayAccount":alipayAccount,"payeeRealName":payeeRealName,"alipayBeginDate":alipayBeginDate,"alipayEndDate":alipayEndDate,"alipayDateType":alipayDateType,"alipayStatus":alipayStatus},
				url:'${contextPath}/security/queryAlipayList', 
				dataType:'json',
				success:function(data){
					$("#alipayInfoList-tbody").empty();			
					if(data.list == ""){
						$("#alipayInfoList-tbody").empty();
						$("#alipayInfoList .pageGoBtn").empty();
						$("#alipayInfoList-tbody").append("<tr class='text-danger'><td colspan='9'>无内容</td></tr>");
						$("#pageSalary").html(data.pageSalary);
						$("#totleSalary").html(data.totleSalary);
						var pageDom = $("#alipayInfoList .pagination");
						pageDom.empty();
					}else{
						pageTotal = data.totlePage; 
						$("#pageSalary").html(data.pageSalary);
						$("#totleSalary").html(data.totleSalary);
						$.each(data.list,function(i,item){
							var orderIdTD,payDateTD,isSuccessTD,TRcss,subMsgTD = "";
							if(item.orderId == null){
								orderIdTD = "<td>无</td>";
							}else{
								orderIdTD = "<td>"+item.orderId  +"</td>";
							}
				//			if(item.payDate == null){
				//				payDateTD = "<td>无</td>";
				//			}else{
				//				payDateTD = "<td>"+item.payDate+"</td>";
				//			}
							if(item.isSuccess){
								isSuccessTD = "<td>成功</td>";
								subMsgTD = "<td>无</td>";
							}else{
								isSuccessTD = "<td>失败</td>";
								TRcss = "style='color:red;'";
								subMsgTD = "<td>"+item.subMsg+"</td>";
							}
							$("#alipayInfoList-tbody").append(
							"<tr "+TRcss+">"+
								"<td>"+(i + 1)+"</td>"+
								"<td>"+item.payeeAccount+"</td>"+
								"<td>"+item.payeeRealName+"</td>"+
								orderIdTD+
					//			payDateTD+
								"<td>"+item.createDate+"</td>"+
								"<td>"+item.amount+"</td>"+ 
								isSuccessTD+
								subMsgTD+
								"<td><a target='_blank' href='${contextPath}/security/queryWorkerRecordByOutBizNo?outBizNo="+item.outBizNo+"'>"+item.outBizNo+"</a></td>"+
							"</tr>"		
							);		
						});
						var pageDom = $("#alipayInfoList .pagination");
						pageDom.empty();
						page.creatPageHTML(pageNum,pageTotal,pageDom,"queryAlipayList");
						/*--------------------------------------跳转页-------------------------------------------------------*/
						$("#alipayInfoList .pageGoBtn").click(function(){
							var pageNum = 0;
							pageNum = $("#alipayInfoList .pageGoText").val();
							if(pageNum !=0&&0<pageNum&&pageNum<pageTotal+1){
								queryAlipayList(pageNum);
							}
						});			
					}
				}
			});
		};
		// 查询各组持有任务数
		$("#notReturnSearch").click(function(){
			$.ajax({
				type:'POST',
				url:'${contextPath}/security/queryNotReturnNums',
				dataType:'json',
				success:function(data){
					$.each(data.result,function(i,item){
						$("#notReturnTotal_"+item.workGroupCode).html(item.notReturnTotal);
						$("#notUploadNum_"+item.workGroupCode).html(item.notUploadNum);
						$("#waitInspNum_"+item.workGroupCode).html(item.waitInspNum);
						$("#waitInspModificationNum_"+item.workGroupCode).html(item.waitInspModificationNum);
					});
				}
			});
		});
		$("#outsourcerSettingBtn").click(function(){
			var conWin = confirm("确定要设置选中的工作组为外包商吗?");
			if(conWin){
				var outsourcerCodes = ""; 
				$(".isOutsourcerCheckbox:checked").each(function(){
					outsourcerCodes += $(this).val()+",";
				}); 
				if(outsourcerCodes.length==0){
					alert("请选择需要设置为外包商的工作组!");
					return false;
				}
				$.ajax({
					type:'POST',
					data:{"tempOutsourcerCodes":outsourcerCodes},
					url:'${contextPath}/security/outsourcerSetting',
					dataType:'json',
					success:function(data){
						if(data.replay == 1){
							getWorkGroupSettingList();
							alert("设置成功");
						}else{
							alert("设置失败, 请联系系统维护人员!");
						}
					}
				});
				
			}
		});
		$("#saveEdit").click(function () {
			var hasContent = false;
			hasContent = UM.getEditor('myEditor').hasContents();
			if (hasContent) {
				var con = UM.getEditor('myEditor').getContent();
				var noticeTitle = $("#noticeTitle");
				if (checkout.text.isempty(noticeTitle,"请填写通知标题！"))
					return;
					
				
				$.ajax({
					type: 'POST',
					url: '${contextPath}/security/addNotice',
					data: {"title": noticeTitle.val(),"content": con,},
					dataType: 'json',
					success: function (data) {
						if ($("#noticeEdit .panel-body .alert").length > 0)
							$("#noticeEdit .panel-body .alert").remove();
						var $alertMsg = $("<div class='alert alert-dismissable'>"+ data.message+ "</div>");
						$alertMsg.append("<button type='button' class='close' data-dismiss='alert' aria-hidden='true'>&times;</button>");
						if (data.replay == "1") {
							$alertMsg.addClass("alert-success");
						} else {
							$alertMsg.addClass("alert-danger");
						}
						$("#noticeEdit .panel-body").prepend($alertMsg);
					}
				});
			}
		});
		toEditRealName = function(userId,realName){
			$("#oldRealName").val("");
			$("#realNameUserId").val("");
			$("#oldRealName").val(realName);
			$("#realNameUserId").val(userId);
			$("#editRealNameModal").modal('show');
		};
		$("#doEditRealName").click(function(){
			var newRealName = $("#newRealName").val();
			var userId = $("#realNameUserId").val();
			$.ajax({
				type: 'POST',
				url: '${contextPath}/security/editRealName',
				data: {"userId": userId,"newRealName": newRealName,},
				dataType: 'json',
				success: function (data) {
					if (data.replay == "1") {
						alert("修改成功!");
						$("#searchBtn").trigger("click");
					} else {
						alert("修改失败,请联系系统维护人员!");
					}
				}
			});
		});
		changeOneLayerSubsidy = function(obj,id){
			if(confirm("请确认是否要修改一层任务补助比例?")){
				$("#changeOneLayerSubsidyInput").val($(obj).html());
				$("#changeOneLayerSubsidyHiddenId").val(id);
				$("#changeOneLayerSubsidyModal").modal('show');
			}
		}
		$("#changeOneLayerSubsidyBtn").click(function(){
			var subsidy = $("#changeOneLayerSubsidyInput").val();
			var paramId = $("#changeOneLayerSubsidyHiddenId").val();
			subsidy=subsidy.replace(/\s/g, '');
			if(subsidy.length==0){
				alert("请填写比例!");
				return false;
			}
			if(isNaN(subsidy)){
				alert("请填写数字!");
				return false;
			}
			if(subsidy<0){
				alert("比例不能小于零!");
				return false;
			}
			$.ajax({
				type:'POST',
				data:{"subsidy":subsidy,"paramId":paramId},
				url:'${contextPath}/security/modifyOneLayerSubsidy',
				dataType:'json',
				success:function(data){
					if(data.replay == 1){
						getWorkGroupSettingList();
						alert("修改成功");
					}else{
						alert("修改失败, 请联系系统维护人员!");
					}
				}
			});
		});
		
		//---------------------------------交流区处理代码----------------------------------------------
		$("#createArticle").click(function(){
			window.open("${contextPath}/security/managerCreateArticle","_blank");
		});
		
		$("#ownedArticle").click(function(){
			window.open("${contextPath}/security/ownedArticleList","_blank");
		});
		
		$("#searchForArticle").click(function(){
			searchTitle = $("#articleTitle").val();
			loadArticles(1);
		});
		
		loadArticles = function(pageNum){
			$.ajax({
				type: 'POST',
				url: '${contextPath}/security/loadArticles',
				data: {"title": searchTitle, "page": pageNum, "createUsername":""},
				dataType: 'json',
				success: function (data) { 
					if(data.topArticleList == ""){
						$("#articleTop-tbody").empty();
						$("#articleTop-tbody").append("<tr class='text-danger'><td colspan='6'>无内容</td></tr>");
					}else{
						$("#articleTop-tbody").empty();
						$.each(data.topArticleList,function (i, item) {
							var isLockedTD_top = "";
							if(item.isLocked==1){
								isLockedTD_top = "<td><img title='该文章禁止评论' alt='该文章禁止评论' src='${contextPath}/images/folder_lock.gif'></td>" 
							}else{
								isLockedTD_top = "<td></td>" 
							}
							$("#articleTop-tbody").append(
								"<tr>"+
									"<td>" + (i + 1) + "</td>" + 
									"<td class='titleTd'><a href='${contextPath}/security/showArticleContent?id=" + item.id + "' target='_blank'>" + item.articleTitle + "</a></td>" + 
									isLockedTD_top+ 
									"<td>" + item.createUsername + "</td>" + 
									"<td>"+item.commentNum+"/"+item.openLogNum+"</td>" + 
									"<td>" + item.createTime + "</td>" + 
								"</tr>"
							);
		
						});
					}
					if (data.list == "") {
						$("#articleList-tbody").empty();
						$("#articleList-tbody").append("<tr class='text-danger'><td colspan='6'>无内容</td></tr>");
						var pageDom = $("#articleList .pagination");
						pageDom.empty();
					} else {
						$("#articleList-tbody").empty();
						$.each(data.list,function (i, item) {
							var isLockedTD = "";
							if(item.isLocked==1){
								isLockedTD = "<td><img title='该文章禁止评论' alt='该文章禁止评论' src='${contextPath}/images/folder_lock.gif'></td>" 
							}else{
								isLockedTD = "<td></td>" 
							}
							$("#articleList-tbody").append(
								"<tr>"+
									"<td>" + (i + 1) + "</td>" + 
									"<td class='titleTd'><a href='${contextPath}/security/showArticleContent?id=" + item.id + "' target='_blank'>" + item.articleTitle + "</a></td>" + 
									isLockedTD+ 
									"<td>" + item.createUsername + "</td>" + 
									"<td>"+item.commentNum+"/"+item.openLogNum+"</td>" + 
									"<td>" + item.createTime + "</td>" + 
								"</tr>"
							);
		
						});
						var pageDom = $("#articleList .pagination");
						pageDom.empty();
						pucPageTotle = data.totlePage;
						page.creatPageHTML(pageNum, pucPageTotle, pageDom, "loadArticles");
						$("#articleList .pageGoBtn").click(function () {
							var pageNum = 0;
							pageNum = $("#articleList .pageGoText").val();
							if (pageNum != 0 && 0 < pageNum && pageNum < pucPageTotle + 1) {
								loadUnCompletePackList(pageNum);
							}
						});
					}
				}
			});
		}
		// 查询被回复的新消息个数    checkUnreadMsgBtn
		loadUnreadMsgNum = function(){
			$.ajax({
				type : 'POST',
				url : '${contextPath}/security/loadUnreadMsgNum',
				success : function(data) {
					$("#unreadMsgNumBadge").html(data.num);
				}
			});
		};
		
		$("#checkUnreadMsgBtn").click(function(){
			window.open("${contextPath}/security/jumpToUnreadMsgListPage","_blank");
		});
		
		$("#articleOpenLogBtn").click(function(){
			window.open("${contextPath}/security/jumpToArticleOpenLogListPage","_blank");
		});
		
		/*------------------------------------------审核48小时超时列表---------------------------------------*/
		inspectionMarkTimeRecordList = function(){
			$.ajax({
				type:'POST',
				data:{"dateType":inspectionDetailDateType,"beginDate":inspectionDetailBeginDate,"endDate":inspectionDetailEndDate},
				url:'${contextPath}/security/queryInspectionMarkTimeRecords', 
				dataType:'json',
				success:function(data){
					$("#inspectionMarkTimeRecord-tbody").empty();			
					if(data.list == null){
						$("#inspectionMarkTimeRecord-tbody").empty();
						$("#inspectionMarkTimeRecord-tbody").append("<tr class='text-danger'><td colspan='7'>无内容</td></tr>");
					}else{
						$.each(data.list,function(i,item){
							$("#inspectionMarkTimeRecord-tbody").append(
							"<tr>"+
								"<td>"+(i+1)+"</td>"+
								"<td>"+item.userName+"</td>"+
								"<td>"+item.inspectorName+"</td>"+
								"<td>"+item.userType+"</td>"+
								"<td title='"+item.qualifiedMarkTimeSec+"秒'>"+item.qualifiedMarkTime+"</td>"+
								"<td title='"+item.unqualifiedMarkTimeSec+"秒'>"+item.unqualifiedMarkTime+"</td>"+
								"<td title='"+item.totalSec+"秒'>"+item.total+"</td>"+
							"</tr>"
							);		
						});
					}
				}
			});
		};
	</script>
</body>
</html>
